<template>
	<view class="flex flex-direction padding">
		<a href="javascript:;" class="cu-btn bg-red lg margin-top" @click="go('eed2dec4-a868-4696-b911-c70ca8f9f7d9','roomApplication')">以游客身份登录</a>
		<a href="javascript:;" class="cu-btn bg-green lg margin-top" @click="go('cccbb3c5-a79c-47cc-8344-4a6d61dc2550','roomApplication')">以普通学生身份登录</a>
		<a href="javascript:;" class="cu-btn bg-green lg margin-top" @click="go('d9824e8c-c998-45e2-8156-34d723049855','roomApplication')">以指导老师身份登录</a>
		<a href="javascript:;" class="cu-btn bg-green lg margin-top" @click="go('b15f7cdb-9f96-4041-a7b2-4cfeebabaa8d','roomApplication')">以管理组老师身份登录</a>
		<a href="javascript:;" class="cu-btn bg-green lg margin-top" @click="go('63d57029-eb82-45e0-9b99-10a829912e0c','roomApplication')">以分管科创副主任身份登录</a>
		<a href="javascript:;" class="cu-btn bg-green lg margin-top" @click="go('8094cf84-01e6-484d-bb01-04a299f5ef5b','roomApplication')">以分管实验室副主任身份登录</a>
		<a href="javascript:;" class="cu-btn bg-green lg margin-top" @click="go('b15f7cdb-9f96-4041-a7b2-4cfeebabaa8d','roomApplication')">以实验室管理员身份登录</a>
		<a href="javascript:;" class="cu-btn bg-green lg margin-top" @click="go('21302f80-cade-406e-85ff-88d37b62f3f8','roomApplication')">以中心办公室主任身份登录</a>
		<a href="javascript:;" class="cu-btn bg-blue lg margin-top" @click="goCreate">列表页面</a>
		<a href="javascript:;" class="cu-btn bg-blue lg margin-top" @click="go('44213f8a-c90a-422b-88c0-815f4de5a000','softwareInstall')">以管理员身份登录</a>
		<a href="javascript:;" class="cu-btn bg-blue lg margin-top" @click="go('d9824e8c-c998-45e2-8156-34d723049855','softwareInstall')">以普通老师身份登录</a>
		<a href="javascript:;" class="cu-btn bg-blue lg margin-top" @click="go('8094cf84-01e6-484d-bb01-04a299f5ef5b','softwareInstall')">以维修者主管身份登录</a>
		<a href="javascript:;" class="cu-btn bg-blue lg margin-top" @click="go('b15f7cdb-9f96-4041-a7b2-4cfeebabaa8d','softwareInstall')">以普通维修者身份登录</a>
		<button @click="clear">清空缓存</button>
	</view>
</template>

<script>
	let app = require("@/config");
	export default {
		methods: {
			goCreate() {
				uni.navigateTo({
					url: "/iuc/softwareInstall/v1/list"
				})
			},
			go(id) {
				uni.post("/uc/getCurrentUserGuid", {
					id
				}, msg => {
					uni.setStorage({
						key: 'currentUserGuid',
						data: msg.currentUserGuid,
					});
					app.currentUserGuid = msg.currentUserGuid;
					app.userInfo = msg.userInfo;
					let ps = app.userInfo.permissons;
					app.checkPermission = (p) => {
						return ps && ps.indexOf(p) >= 0;
					};
					uni.navigateBack({
						
					})
				});
			},
			clear() {
				uni.clearStorage();
				uni.navigateBack({
					
				});
			}
		},
		data() {
			return {
				app
			}
		}
	}
</script>

<style lang="less">
</style>
